package com.panghl.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class ConstantPropertiesUtils implements InitializingBean {

    @Value("${spring.mail.username}")
    private String username;
    @Value("${spring.mail.subject}")
    private String subject;


    public static String USERNAME;
    public static String SUBJECT;

    @Override
    public void afterPropertiesSet() throws Exception {
        USERNAME = username;
        SUBJECT = subject;
        System.out.println(username);
        System.out.println(subject);
    }

}
